Title: GunMod's Radiance Lighting Mod
Version: 2.0
Date: Nov/02/2005
Author: JD "GunMod" Wohlever

====================================

Description:

Enhanced lighting system for the Sims 2. Uses physics laws of light
to ensure the most realistic lighting possible within The Sims 2.
With over 3 months of research and testing in this final version,
you will find your enviroment within The Sims 2 much more pleasing
and usable.

====================================


Known Issues - VERY IMPORTANT

First of all, please be aware that the graphics
engine in The Sims 2 does have some quirks and
limitations that I can not overcome with a mod of this nature.

With that in mind, the following bugs are known, and do work arounds exist
for them. If these bugs are intolerable to you, I suggest you don't use the mod.

1) Time of day change from one phase to the next is rapid.
         
Reason: The light change from the surrounding neighborhood
and the actual lot you are playing on work on different light effects and
different times. The timing of light changes to the neighborhood are
hard coded and can not be changed. So in order to not have a fully lit
lot and a half dark nieghborhood, the light change from one phase to the next
must be rapid.


2) A very thin bright line around the edges lot is visable at night.

Reason: Again, the surrounding neighborhood light adjacent to the lot
does not share the same degree of fidelity in regards to lighting. So while
the lot itself has much better lighting applied to it, the surrounding
neighborhood does not support many of the features that the lot
lighting does. Maxis never intended for the lighting to be this high-end
so a certain degree of difference between the lot edge and the neighborhood
is visable. This is in the default game as well if you look closely.
This mod just makes the problem more visable.



4) I found a couple of the default maxis objects are bugged. 
A) The lamp with the black lamp shade.
Most lights in the game release 2 types of light. Practical and
Diffiuson. Without getting technical, this table lamp only emits Diffusion.
This means that the floor and the walls will light up with this lamp
but any objects near it will not. This is not a result of the mod in anyway.
The mod only brings the problem into focus because before both lighting types
were not as required.
B) There is also one overhead light that only emits diffusion.
Its the small black light (3rd cheapest I believe). This I believe was intentional
on this light because it is meant to be a diffusor only.
C) The Alienware Computer has a "magical light". For some reason this light
stays on even when the computer is turned off sometimes. It also emits a very
strong light that goes through walls.
This is not a result of the mod but was not as noticable
before because you couldn't really see the light.


Questions and Answers

This section will list answers to some questions some of you may ask, so instead
of repeating the same answer for common questions, I will try to address what I think
you may ask.

1) Can you make realistic skys?

No. Even though I added 2 more time changes, The Sims 2 only has 2 actual "skys"
and these skys are written in Pixel Shader code.  In order to change these
skys I would have to rewrite the pixel shader code.

2) Why is the sky the same color at daybreak as it is at night?

See #1

3) Why is the sky the same color at twilight as it is during the day?

See #1

4) Why isn't a sealed room pitch black when no lights are on?

Two reason: A) The game will become overly difficult. A lot of times you need to assign
your sim a task in a dark room or navigate a sim from a dark room. If the room was completely
dark you would not be able to see anything.
B) The lighting system is very sensitive to ambiant light. Ambiant light is bounced light
from a indirect source. (Look at a shadow under a car during the day, even though it's darker
it is not completey black)  If I lowered the ambiant light to zero in a room with no light source,
this would affect the entire game, it can not be done on a room by room bases. The ambiant level
has to be a certain amount or the objects will not receive bounce light when in a room with lighting

5) Why is part of the floor or objects "glowing" when lights are on?

This is a real factor of light. Put too much light on an object and you get
what I call Light Flash. Features get blasted out with too much light.
So if the sun is shining through the east window, the floor will recieve more light
than say the west side of the room and will glow more than the rest of the floor.
In more advance gaming engines, developers are using this to make subtle effects
and to make more realism in the enviroment. I have tried to find a good balance
between realism and useabilty.
If you place lights properly you should not see a problem arise from this. However if you place
5 100 watt lamps 2 feet away from a white table cloth, it's going to have a glow to it, just as in real life.


6) Can you add this feature ABC or change ABC?

No, This is the final version of this mod for this game. When a new EP is released I may
make an updated version so that it will work with the EP, but I will not change the function
or features of this mod. Too much work on one type of mod burns me out so I don't stay on one
facet of a game for too long.

7) I downloaded object XYZ or tried this other mod, ABC, and the object or mod
does not work right.

I only made this mod with the default Maxis lights in mind. As long as the creator
of the new object followed the required aspects of 3D and applied proper texture mapping
and so forth, the object should display as intended. However I can not be responsible for
other people's mistakes.
If you have downloaded some other lighting type mod, that changes the way light is displayed
on a global scale, then chances are it will not work with this mod, or their mod will override mine.
An example of this would be the colored spotlight mods. Apparantly it modifies the way lights
are emiited from the spotlights which is different from the orginal Maxis default so my mod will cause
the lights to look different than the mod creator may have intended.

8) My sim has on a white shirt, but when I go into room XYZ, his shirt has a red tint.

The room must have a reddish floor or walls. This is not a bug but a feature. Light bleeding
is an actual occurance. Take a bright safety orange object and place a white t-shirt next to it.
The shirt will have an orange glow to it. Now imagine the entire room with safety glow orange walls
and flooring. Everything in the room would have the orange hue to it.


9) I have light coming in through the roof shining on the walls!

This is due to the mod now making light travel realistic distances.
The Reason is because when you built your roof there is an "open area" from where
the ceiling should be and where the attic would be.
To fix this, click up to one level and make sure you have a solid floor between floors.
Since the game doesn't have "ceilings" this is faked by the game to simulate a ceiling.
The roof itself does not block all light as a real roof would. This again is a default problem
that was not visable before. As long as you place a floor down above the ceiling (any tiles will work)
then this will block the leaking light.


10) Your mod caused my house to blow up, my cat to have triplets, or
some other wild crazy claim.

No, it didn't. :)
If you read the install procedures and follow the instructions, this mod
will work as intended. 

###################################################
DEFINITIONS
###################################################
Terms Used through out this Readme you should know:

PS2.0 or PS1.0:
PS stands for Pixel Shaders. Most modern video cards support at least
2.0. Some cards may only support PS 1.x. If your video cards does not
support pixel shaders 2.x then some of the features of this mod will
have to use the default Maxis items (Like Pool Water etc)

Diffusive Lighting:
In the game diffusive lighting is light that affects walls and floors Only.

Practical Lighting:
In the game practical lighting is light that affects Sims and Objects Only.

All lights SHOULD have both diffusive and practical lighting. A lot of Maxis lights did not.
Most do now (See Bugs Below)

Portals:

Portals are basically little boxes. A room with no doors or windows is a portal.
A joining room with a door is another portal.
A Window is a portal.
A archway is a portal.
An opening in a wall is not a portal.
Light can ONLY travel through 1 portal length.
If you have 3 rooms in a row with archways, the light from room 1 will only travel to room 2
and not into room 3 UNLESS Room 3 is connected directly to room 1.
Light from Room 2 would travel to both Rooms 1 and 3 because both rooms are directly
connected to Room 2,

#######################################################################################
BUGS:
#######################################################################################

These are bugs not caused by the mod but rather are limitations either in hard code (game exe)
or limitations of the 3D engine itself. If a bug is listed here it means that this item could
not be fixed or worked around. Just because you did not notice a bug before doesn't mean it wasn't there.
The default maxis lighting was very bright so a lot of these problems were not as noticable.


FIRE EFFECTS -
#############################################################################
Fire effects are hard coded to a degree.
While I can change the color of the light thrown by fire I can not force diffusive light
on floors or walls. So only Objects and Sims will get lit by fireplaces, not walls and floors.
The bonfire object is supposed to be a 2 stage object. Unlit it doesn;t emit light,
when lit it does. However, the problem is the second stage never turns the diffuse lighting
on, only the practical lighting.
So to some it up, Fireplaces, the Bon Fire and the Firejet do not emit diffusive light, only practical light.

FOUNDATIONS/DECKS -
###################################################################################
In the game light must follow the portal rule (see Definitions about Portals Above)
Unfortunatly a Foundation is considered a portal.
This means that light affecting the foundation will not affect on the wall above it.
This also means light affect the walls will not affect the foundation below it.
The only way to force this is to make a very powerful light that seeps into the
other portal but this is undesirable.


BROKEN LIGHTS:
#####################################################################################
Computers and Aquariums - The light for the computers/aquariums leaks through walls.
I have disabled lighting on the computers/aquariums. 
The only way to fix this would be to make new computers/aquariums which
reference lighting that does not "leak"
Lunatech "Lighten Up" Lighting Fixture- (Second from the Left Top Row of Overhead Lights for $75)
Ok, this light is broke. For some reason when Maxis coded this light they made it a spotlight
rather than a pointlight. Even making a new package file with the light as a pointlight
will not fix this light because it's name has Spotlight in it which overrides the "pointlight" features.
As a result I have made this light work like a recessed light embedded in the ceiling would work.
(Imagine lights you see in a hotel lobby that are upside the ceiling)
Light will shine directly down and illuminate things below it but it will not "light up" a room
unless the room is very small. Also note that objects high up on the walls will not be lit at all
with this light (Like smoke detectors, etc)
This means you will WANT to go into any lot/neighborhood/downtown and either
replace this light with another, or readjust the lighting for these lots.
Sugar Bowling Alley in NL Downtown is a perfect example.

CORRUPT LOOKING GRAPHICS IN NEIGHBORHOOD VIEW (Not the Red Flashing):
######################################################################################
This is not a result of the mod. I found that under the following tests I could reproduce the problem.
If you own an NVIDIA grahpics card the bug will manifest itself under the following conditions:
1) Anti-Aliasing in NVIDIA control panels is forcing AA.
2) You have an SLI Rig (2 graphics cards running as one) and have SLI enabled for the game.
Fixes:
1) Turning of Smoothing in the game AND disabling AA through NVIDIA controls for the game
2) If you have SLI, disable SLI for The Sims 2 Profiles.

OUTDOOR LIGHTS ON A POLE
#########################################################################################
Due to the new way lighting works, for an outdoor light on a pole, example, a streetlight,
they MUST be placed at least 2 tiles (in build mode) away from a building WITH A FOUNDATION or they will not light properly.
You CAN place say a streetlight next to the wall of house, but it must be rotated to face away from the structure.



Thanks to the following:

Targa - For helping me figure out that we can't change the skys.
Thanks for trying, maybe in Sims 3? ;)

adam858 - Helping bug test the ambiant light and light changing problems.

PatchesSim2 - For throwing all those ideas out there and "crowd control" ;)

MapDark - For helping those I couldn't help.

Dizzy2 - For the great Smart Lights 2 package that make the lights come on and off correctly.

Everyone Else: For reading this long winded but essential readme!

